<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: news_ticker.php 140 2013-09-22 07:44:23Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 140 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-22 07:44:23 +0000 (Sun, 22 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

$ticker = $db->db_query("SELECT ticker_text FROM ".TABLE_NEWS_TICKER." WHERE language_id = '".(int)$_SESSION['languages_id']."' AND status = '1' ");

if($ticker->_numOfRows) {
	$box_news_ticker .= '<div id="ticker-area"><ul>';
		while(!$ticker->EOF) {
			$box_news_ticker .= '<li>'.$ticker->fields['ticker_text'].'</li>';
			$ticker->MoveNext();
		}
	$box_news_ticker .= '</ul></div>';
	$get[] = 'nt=true';
	
	$box_smarty = new smarty;
	$box_smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/');
		
	$box_smarty->assign('BOX_CONTENT',$box_news_ticker);
	$box_smarty->assign('html_tpl_path', CURRENT_TEMPLATE.'/html');
	$box_smarty->assign('language', $_SESSION['language']);
	
	if (!CacheCheck()) {
		$box_content = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_news_ticker.html');
	
	} else {
		$cache_id = $_SESSION['language'];
		$box_content = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_news_ticker.html',$cache_id);
	}
}	
?>